<template>
  <div class="getMedal">
    	<img class="close" src="../assets/img/butuisong@2x.png" @click.stop.self="close(momentType, momentId)"/>
      <a :href="Props.USER_CODE | userDetailFilter">
      	<div class="getMedal_con" @click="bury">
      		<div class="touxiang">
            <avatar :src="Props.USER_PHOTO" :href="Props.USER_CODE"/>
      			<!-- <img :src="Props.USER_PHOTO !== ''? Props.USER_PHOTO : `${require('@/assets/img/touxiangBG@2x.png')}`"/> -->
      		</div>
      		<div class="info">
            <div class="info_name">
              <span class="v_name">{{Props.NICK_NAME}}</span>
            </div>
      			 <p class="info_con1">刚刚获得一枚{{Props.MEDAL_TYPE}}</p>
      			 <p class="info_con2">{{ Props.MEDAL_NAME }}</p>
      			 <span class="go_other">
      			 	 看看 TA >
      			 </span>
      		</div>
      	</div>
      </a>
    <slot></slot>
  </div>
</template>

<script>
import BottomBar from './common/BottomBar'
import MomentMixin from './MomentMixin'
import { userDetailFilter } from '../filters/userFilter'
import Utils from '../tools/utils'
import Avatar from './Avatar'

export default {
  name: 'getMedal',
  props: {
    Props: Object
  },
  filters: {
    userDetailFilter
  },
  mixins: [MomentMixin],
  components: {
    Avatar,
    BottomBar
  },
  methods: {
    /**
     * 埋点
     * @return {void}
     */
    bury () {
      Utils.buryPoint('22002')
    }
  }
}
</script>

<style lang="less" scoped>
@import "./common/mixins.less";

.getMedal {
  .moment;
  position: relative;
  .close {
  	position: absolute;
  	right: 4px;
  	top: 0px;
  	width: 34px;
  	height: 24px;
  }
}
.getMedal_con {
	height: 143px;
	width: 100%;
	padding: 35px 35px 0 41px;
	box-sizing: border-box;
	display: flex;
	flex: 1;
	text-align: left;
}
.touxiang {
	width: 58px;
	height: 58px;
  border-radius: 50%;
  overflow: hidden;
	margin-right: 17px;
	img{
		display: block;
		width: 58px;
	  height: 58px;
	}
}

.info_con1,.info_con2 {
	.info_con_font;
}
.info_con1 {
	color: #777777;
	margin-bottom: 3px;
}
.info_con2 {
	color: #FD363B;
	margin-bottom: 10px;
}
.go_other {
	.go_other_font;
}
</style>
